home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mgr / sparcmgr / demo2.zoo / demo / ex / bcopy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-04-24  |  647 b   |  32 lines

  1. /*
  2.  * Copyright (c) 1980 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  */
  6.  
  7. #ifndef lint
  8. static char *sccsid = "@(#)bcopy.c    7.4 (Berkeley) 3/9/87; 1.2 (Bellcore)    87/04/24";
  9. #endif not lint
  10.  
  11. /* block copy from from to to, count bytes */
  12. bcopy(from, to, count)
  13. #ifdef vax
  14.     char *from, *to;
  15.     int count;
  16. {
  17. #ifndef vms
  18.     asm("    movc3    12(ap),*4(ap),*8(ap)");
  19.     /* ARGSUSED */
  20. #else
  21.     lib$movc3(&count, from, to);
  22. #endif
  23. }
  24. #else
  25.     register char *from, *to;
  26.     register int count;
  27. {
  28.     while ((count--) > 0)    /* mjm */
  29.         *to++ = *from++;
  30. }
  31. #endif
  32.